SDK/J Authentication Package ver1.0
RICOH Confidential

jp.co.ricoh.dsdk.scard.option.security
Interface AuthenticateService


public interface AuthenticateService

This interface supports authentication services . Comparing to CHVService supports security check with password or PIN in plain text, AuthenticateService provides much stronger security check with encrypted key. Internal authenticaton used to authenticate the card’s identity to the terminal; external authentication used to authenticate the terminal’s identity to the card.


Method Summary
 void closeApplication(SecurityDomain domain)
          Resets the achieved external authentications on the smartcard .
 boolean externalAuthenticate(SecurityDomain domain, int keyNum, SignCredential credential)
          Performs an external authentication against the smartcard .
 int getChallengeLength()
          Determines the required length of a challenge for internal authentication .
 byte[] internalAuthenticate(SecurityDomain domain, byte keyNum, byte[] challenge)
          Requests an internal authentication from the smartcard .
 

Method Detail

closeApplication

public void closeApplication(SecurityDomain domain)
                      throws CardServiceException
Resets the achieved external authentications on the smartcard .

Parameters:
domain - the range external authentication is effective .
Throws:
CardServiceException - if this service encountered an error .

externalAuthenticate

public boolean externalAuthenticate(SecurityDomain domain,
                                    int keyNum,
                                    SignCredential credential)
                             throws VerificationException,
                                    CardServiceException
Performs an external authentication against the smartcard . The smartcard will generate a random challenge and encrypt it using credential passed as an argument. The result of encryption will be verified using external key specified in argument. If the credential provided by the terminal or host application is the one expected by the smartcard, the external authentication succeeds.

Parameters:
domain - the range external authentication is effective .
keyNum - a reference identifying the external key to be used for external authentication .
Returns:
credential the secret to be used to authenticate the application against the smartcard .
Throws:
VerificationException - when authentication is failed .
CardServiceException - if this service encountered an error .

internalAuthenticate

public byte[] internalAuthenticate(SecurityDomain domain,
                                   byte keyNum,
                                   byte[] challenge)
                            throws VerificationException,
                                   CardServiceException
Requests an internal authentication from the smartcard . The smartcard will take the random challenge passed as argument, perform some operations involving a secret, and return the result of these operations. The terminal or host application can then check the result to verify that the secret used by the card is the expected one, thereby authenticating the card.

Parameters:
domain - the range internal authentication is effective .
keyNum - a reference identifying the internal key to be used for internal authentication .
challenge - the random challenge to be used by the smartcard .
Throws:
VerificationException - when authentication is failed .
CardServiceException - if this service encountered an error .

getChallengeLength

public int getChallengeLength()
Determines the required length of a challenge for internal authentication .

Returns:
the number of bytes in an appropriate random challenge .

SDK/J Authentication Package ver1.0
RICOH Confidential